home *** CD-ROM | disk | FTP | other *** search
- /****i* SOURCE_FILE/INFO
- *
- * NAME
- * HttpResponse.js
- *
- * USAGE
- * Part of Netobjects JavaScript Library.
- *
- * COPYRIGHT
- * Copyright ⌐ 2000-2005 Website Pros, Inc.
- * All Rights Reserved.
- *
- * This is an unpublished work protected by Website Pros, Inc.
- * as a trade secret, and is not to be used or disclosed except as
- * expressly provided in a written license agreement executed by
- * you and Website Pros, Inc.
- *
- * <copyright@websitepros.com>
- *
- * NOTES
- * JavaScript code.
- *
- *****/
-
- if (!IS_isModuleInitialized("IS.NOF.NET.HttpResponse"))
- {
-
- /****h* NOF_JavaScript_Library/NOF.NET.HttpResponse
- *
- * NAME
- * NOF.NET.HttpResponse
- *
- * DESCRIPTION
- *
- *
- ****/
-
- /**
- * Constructor
- */
- function NET_HttpResponse () {
- this.__proto__ = NET_HttpResponse.prototype;
-
- this.URL = null;
-
- this.headers = new Array();
- this.content = null;
-
- this.statusCode = -1;
- }
- {
- var member = NET_HttpResponse.prototype;
- member.CLASS_NAME = "NET.HttpResponse";
-
- var method = NET_HttpResponse.prototype;
-
- /**
- * Get header value
- * @return the header for headerName
- **/
- method.getHeader = function (/*String*/ headName) { return this.headers[headName.toLowerCase()]; }
-
- /**
- * Get all headers values
- *
- * @return the list of headers, as an Array indexed by headerName's
- **/
- method.getHeaders = function () { return this.headers; }
-
- /**
- * Get response content
- *
- * @return a String containing the content of the response
- **/
- method.getContent = function () { return this.content; }
-
- /**
- * Get return status-code value
- *
- * @return status code returned by the server (ie. 200 for OK, 404 for Object Not Found, etc)
- **/
- method.getStatusCode = function () { return this.statusCode; }
-
- }
-
- NET.__proto__.HttpResponse = NET_HttpResponse;
- }